package com.yonyou.gmmc.service.pointactivity.dao;

import java.util.List;
import java.util.Map;

import com.yonyou.gmmc.common.annotation.OracleDb;
import com.yonyou.gmmc.service.pointactivity.model.TtLhasaActivityRecord;

import feign.Param;
import tk.mybatis.mapper.common.Mapper;

@OracleDb
public interface TtLhasaActivityRecordMapper extends Mapper<TtLhasaActivityRecord> {

	/**
	 * 查询openId对应的奖券记录
	 * 
	 * @param openId
	 * @return
	 */
	public List<Map<String, Object>> viewRecordByOpenId(@Param("openId") String openId);

	/**
	 * 将提醒标识变更为已提醒
	 * 
	 * @param id
	 */
	public void updateIsPromptStatus(@Param("recordId") Long recordId);
	
	/**
	 * 更改上传时间
	 * 
	 * @param id
	 */
	public void updateEnableDate(@Param("recordId") Long recordId);

	/**
	 * openId和奖券关联记录
	 * 
	 * @param id
	 */
	public int luckDraw(Map<String, Object> param);

	/**
	 * 上传照片
	 * 
	 * @param param
	 * @return
	 */
	public int uploadPhoto(Map<String, Object> param);
	
	/**
	 * 查询openId下,奖券Id对应的照片List
	 * @param recordId
	 * @param openId
	 * @return
	 */
	public List<Map<String, Object>> viewPhoto(Map<String, Object> param);

	/**
	 * 初始化奖票
	 * 
	 * @param id
	 */
	public void insertLottery(Map<String, Object> param);

	/**
	 * 删除没有被领取的奖票
	 */
	public void deleteLottery();

	/**
	 * 查询现有多张奖票
	 */
	public Map<String, Object> selectLotteryCount();

	/**
	 * 查询现有多张奖票
	 */
	public Map<String, Object> getOneLottery(@Param("currentDate") String currentDate);

	/**
	 * 记录用户进入页面几次
	 * @param openId
	 */
	public void goToLhasaVisitRecord(Map<String, Object> param);
	
	/**
	 * 定时任务
	 */
	public void lotteryTasks(@Param("currentDate") String currentDate);

	public List<Map<String, Object>> getAllLottery(@Param("currentDate") String currentDate);
	
	public List<Map<String, Object>> getActivationEndDate(@Param("currentDate") String currentDate);

}
